<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('申请内容详细')" />
	<th:block th:include="include :: jsonview-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m-t" id="signupForm" action="/per/app/content/approveUpdate">
		<input type="hidden"  th:id="contentId" th:value="${contents.contentId} ">
		<div class="form-group ">
			<label class="col-sm-2 control-label">申请内容id：</label>
			<div class="form-control-static" th:text="${contents.contentId} ">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">申请类型：</label>
			<div class="form-control-static" th:text="${contents.typeName}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">申请人：</label>
			<div class="form-control-static" th:text="${contents.empName}">
			</div>
		</div>

		<div th:if="${contents.status}!=2">
		<div class="form-group">
			<label class="col-sm-2 control-label">审批原因：</label>
			<div class="form-control-static" th:text="${contents.casue}">
			</div>
		</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">申请内容描述：</label>
			<div class="form-control-static" th:text="${contents.remark}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">申请内容：</label>
			<div class="form-control-static" th:text="${contents.contentText}">
			</div>
		</div>
		<div th:if="${contents.status}==2">
			<div class="form-group">
				<label class="col-sm-2 control-label">审批原因：</label>
				<textarea class="form-control-static" name="cause" id="cause">
				</textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">审批结果：</label>
			<div>
				<input type="radio" name="status" checked value="0"> 通过
				<input type="radio"  name="status" value="1"> 未通过
			</div>
		</div>
		<div class="form-group" style="text-align: center" >
			<input type="submit" id="submitApprove" class="btn btn-success" value="提交" >
		</div>
	</form>
</div>




<script type="text/javascript" >

	$('#submitApprove').click(function(){
		$('#signupForm').submit();
	});

	// var prefix = "/per/app/content";
	//
	// $("#signupFor").validate({
	// 	onkeyup: false,
	// 	rules:{
	//
	// 	},
	// 	messages: {
	// 		"empId": {
	// 			remote: "没有该员工"
	// 		},
	//
	// 		"cause": {
	// 			required: "审批原因不能为空"
	// 		}
	//
	// 	},
	// 	focusCleanup: true
	// });
	//
	// function submitHandler() {
	// 	if ($.validate.form()) {
	// 		var data = $("#signupFor").serializeArray();
	// 		var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
	// 		data.push({"name": "status", "value": status});
	// 		$.operate.saveTab(prefix + "/approve", data);
	// 	}
	// }

</script>
</body>
</html>